﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter11.Code02.Code01.Example04
{
    public class Checker
    {
        public void Check(object param1)
        {
            if (param1 is ClassA)
            {
                Console.WriteLine("Variable can be converted to ClassA.");
            }
            else
            {
                Console.WriteLine("Variable can't be converted to ClassA.");
            }
            if (param1 is IMyInterface)
            {
                Console.WriteLine("Variable can be converted to IMyInterface.");
            }
            else
            {
                Console.WriteLine("Variable can't be converted to IMyInterface.");
            }
            if (param1 is MyStruct)
            {
                Console.WriteLine("Variable can be converted to MyStruct.");
            }
            else
            {
                Console.WriteLine("Variable can't be converted to MyStruct.");
            }
        }
    }
}
